package com.gxa.common.entity.financial_management;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class ExchangeRateManagement {

  @TableId(type = IdType.AUTO)
  private Long id;
  private Byte baseCurrency;
  private String systemExchangeRate;
  private String currentDayExchangeRate;
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8:00")
  private Date startValidTime;
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8:00")
  private Date endValidTime;
  private Byte status;
  private String remark;
  private Integer floatingRedLine;
  private String exchangeRateFormula;

  //特殊属性
  @TableField(exist = false)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date startTime;
  @TableField(exist = false)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date endTime;

}
